<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ page import="com.hzqy.commons.utils.ConstantUtils" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>内容详情</title>
	<link rel="stylesheet" type="text/css"	href="../static/js/themes/defalut.css">
	<link rel="stylesheet" type="text/css"	href="../static/js/themes/public.css">
	<link rel="stylesheet" type="text/css"	href="../static/js/themes/ddspstyle.css">
	<link rel="stylesheet" type="text/css"	href="../static/js/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css"	href="../static/js/themes/icon.css">
	<link rel="stylesheet" type="text/css"	href="../static/js/WdatePicker/skin/WdatePicker.css">
	<script type="text/javascript" src="../static/js/jquery.min.js"></script>
	<script type="text/javascript" src="../static/js/jquery.easyui.min.js"></script>
	<script type="text/javascript"	src="../static/js/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../static/js/jquery.validate.js"></script>
	<script type="text/javascript" src="../static/js/index.js"></script>
	<script type="text/javascript" src="../static/js/WdatePicker/WdatePicker.js"></script>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<%
		String para =request.getParameter("f_cc_id");
		int f_cc_id = 0;
		if(para != null)
			f_cc_id = Integer.valueOf(para);
		String myIp = session.getServletContext().getInitParameter("img_url");
		String []nonceObj=ConstantUtils.getNonceObject();
	%>
	<script type="text/javascript">
		$(function() {
			var f_cc_id = <%=f_cc_id%>;
			$("#f_cc_id").val(f_cc_id);
			//获取内容信息
			$.ajax({
				url:"select_content.do?f_cc_id="+f_cc_id,
				success:function(data) {
					data = JSON.parse(data);
					$("#f_cc_code").html(data.f_cc_code);
					$("#f_cc_searchname").html(data.f_cc_searchname);
					$("#f_cc_tags").html(data.f_cc_tags);
					$("#f_cc_name").html(data.f_cc_name);
					$("#f_cc_companyname").html(data.f_cc_companyname);

					if(data.f_cc_type==1){
						status="电视剧";
					}else if(data.f_cc_type==2){
						status="电影";
					}else if(data.f_cc_type==3){
						status="直播";
					} else if(data.f_cc_type==4){
						status="图文";
					} else if(data.f_cc_type==5){
						status="链接";
					} else if(data.f_cc_type==7){
						status="转码视频";
					} else if(data.f_cc_type==20){
						status="组织模版";
					} else if(data.f_cc_type==100){
						status="业务账号";
					} else if(data.f_cc_type==110){
						status="其他";
					}
					$("#f_cc_type").html(status);

					$("#f_cc_desc").html(data.f_cc_desc);
					$("#f_cc_onlinedate").html(data.f_cc_onlinedate.substring(0,19));
					$("#f_cc_offlinedate").html(data.f_cc_offlinedate.substring(0,19));
					$("#f_cc_director").html(data.f_cc_director);
					$("#f_cc_actors").html(data.f_cc_actors);
					$("#f_cc_screenwriter").html(data.f_cc_screenwriter);
					$("#f_cc_mediacode").html(data.f_cc_mediacode);
					if(data.f_cc_status==2||data.f_cc_status==4){
						$("#radio1").val(16);
					}
					if(data.f_cc_status==16||data.f_cc_status==13){
						$("#radio1").val(1);
						$("#radio2").val(13);
					}

					if(data.f_cc_type == 7){
						$("#playVideoBtn").click(function(){
							playVideo('<%=myIp%>vol-itv/files/input/' + data.f_cc_code);
						});
						$("#videoFieldSet").css('display', 'block');
						$("#radio1").val(5);
					}
				}
			});
			//获取内容绑定的分类信息
			$.ajax({
				url:'select_contentBindCatalog.do?f_cc_id='+f_cc_id,
				success:function(data){
					data = JSON.parse(data);
					var str = "";
					for(var i=0;i<data.length;i++) {
						str+=data[i].f_catalog_name+",";
					}
					if(!str=="")
						str =str.substring(0, str.length-1);
					$("#bindCatalog").html(str);
				}
			});
		});

		function _submitFm() {
			app_ajax('review_content.do', $("#contentForm").serialize(), function(data) {
				if (data.success) {
					$.messager.progress('close');
					$.messager.alert('提示', '审核成功！', 'info', function() {
						parent.$('#dlg').dialog('close');
						parent.gotoSearch($('#easyui-treegrid'));
					});
				} else {
					$.messager.alert('提示', data.result, 'info', function() {
						$.messager.progress('close');
					});
				}
			});
		}

		function playVideo(url){
			console.log(url);
			var win=window.open("", "newwindow", "height=500, width=870, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
			win.document.body.innerHTML='<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" Name="MediaPlayer" src="'+url+'" HEIGHT="100%" WIDTH="100%" ShowControls="1" ShowPositionControls="1" ShowAudioControls="1" ShowTracker="0" ShowDisplay="1" ShowStatusBar="0" ShowGoToBar="0" ShowCaptioning="0" AutoStart="1" AutoRewind="0" AnimationAtStart="0" TransparentAtStart="0" AllowChangeDisplaySize="0" AllowScan="0" EnableContextMenu="1" ClickToPlay="1"></embed>';
		}

	</script>
</head>

<body class="overfwidth">
<div class="barnavtop">您所在的位置：内容管理 &gt; 内容审核</div>
<div id="workspace">
	<!--主体 开始-->
	<div id="container">
		<div class="editspace">
			<form id="contentForm" class="cmxform" enctype="multipart/form-data" name="formName">
				<input type="hidden" name="stime" value="<%=nonceObj[0]%>"/>
				<input type="hidden" name="sign" value="<%=nonceObj[1]%>"/>

				<input type="hidden" id="f_cc_id" name="f_cc_id" value="" />
				<legend>内容审核</legend>
				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									内容名称:
									<font id="f_cc_name" style="width: 150px;"></font>
								</td>
								<td width="10%" align="left">
									企业名称:
									<font id="f_cc_companyname" style="width: 150px;"></font>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									内容类型:
									<font id="f_cc_type" style="width: 150px;"></font>
								</td>
								<td width="10%" align="left">
									内容简介:
									<font id="f_cc_desc" style="width: 150px;"></font>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									上线时间:
									<font id="f_cc_onlinedate" style="width: 150px;"></font>
								</td>
								<td width="10%" align="left">
									下线时间:
									<font id="f_cc_offlinedate" style="width: 150px;"></font>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									导演:
									<font id="f_cc_director" style="width: 150px;"></font>
								</td>
								<td width="10%" align="left">
									演员列表:
									<font id="f_cc_actors" style="width: 150px;"></font>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									编剧:
									<font id="f_cc_screenwriter" style="width: 150px;"></font>
								</td>
								<td width="10%" align="left">
									标签:
									<font id="f_cc_tags" style="width: 150px;"></font>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									内容Code:
									<font id="f_cc_code" style="width: 150px;"></font>
								</td>
								<td width="10%" align="left">
									查询名称:
									<font id="f_cc_searchname" style="width: 150px;"></font>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									绑定分类:
									<font id="bindCatalog" style="width:150px;"></font>
								</td>
								<td class="hide-item" width="10%" align="left">
									播放CODE:
									<font id="f_cc_mediacode" style="width:150px;"></font>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>


				<fieldset id="videoFieldSet" style="display: none;">
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									播放视频:
									<button type="button" id="playVideoBtn">播放</button>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>


				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">
									<jsp:include page="../pictures/pictures_info.jsp" flush="true">
										<jsp:param value="内容" name="picType"/>
										<jsp:param value="<%=f_cc_id %>" name="f_cp_relationid"/>
									</jsp:include>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

				<fieldset>
					<div class="fitem">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td width="10%" align="left">审核备注:</td>
								<td>
									<textarea id="f_cc_remark" name="f_cc_remark" rows="3" cols="30"></textarea>
								</td>
							</tr>
							<tr>
								<td width="10%" align="left">视频审核:</td>
								<td>
									<input type="radio" id="radio1" checked="true" name="f_cc_status" value="1">上线</input>
									<input type="radio" id="radio2" name="f_cc_status" value="4">审核不通过</input>
								</td>
							</tr>
						</table>
					</div>
				</fieldset>

			</form>
		</div>
		<div class="toolbar" style="text-align: center;">
			<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'"
			   href="javascript:void(0);" onclick="_submitFm()">保存</a> <a
				href="javascript:void(0);" data-options="iconCls:'icon-cancel'"
				class="easyui-linkbutton"
				onclick="javascript:parent.$('#dlg').dialog('close')">取消</a>
		</div>
	</div>
	<!--主体 结束-->
</div>
</html>
